ScanDocument CreateVectorImage

Create a handler for a VectorImage object that allows defining shapes to build a marking image. The function provides various overloads to accommodate different requirements and complexities in shape handling and manipulation using ScanLayers and ScanShapes. The simplest form of the function creates a blank VectorImage object, and additional shapes can be added to it by the API user.

Overloads

public VectorImage CreateVectorImage(string name, DistanceUnit distanceUnits)
public VectorImage CreateVectorImage(string name, IList<ScanLayer> layerList, DistanceUnit distanceUnits)
public VectorImage CreateVectorImage(string name, IList<ScanLayer> layerList, LaserParameters laserParameters, DistanceUnit distanceUnits)
public VectorImage CreateVectorImage(string name, ScanLayer layer, DistanceUnit distanceUnits)
public VectorImage CreateVectorImage(string name, IList<ScanShape> shapeList, LaserParameters laserParameters, DistanceUnit distanceUnits)
public VectorImage CreateVectorImage(string name, ScanShape shape, DistanceUnit distanceUnits)

 

Return value

VectorImage A Handle to a vector image object

 

Parameters

string name Unique name of the vector image
IList<ScanLayer> layerList Add a layer list with defined vector images
ScanLayer layer Add layer with defined vector images
LaserParameters laserParameters Laser parameters to use with this vector image
DistanceUnit distanceUnits Units to use with laser marking
IList<ScanShape> shapeList Add a shape list to this vector image
ScanShape shape Add a shape to this vector image

Note The name property of the vector image should be a unique name and if a similar name has already been used, the command will throw an exception.

Exceptions

ArgumentException Throws if the specified name contains invalid character or if a VectorImage is already created with the same name.

 

Example

Copy
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);